<div class="modal-header">
  <button type="button" class="close" ng-click="$dismiss()" aria-hidden="true" aria-label="Close">
    <span aria-hidden="true" class="fa fa-times"></span>
  </button>
  <div class="h3 modal-title">
    <translate>Create Folder In: {$ ctrl.model.container.name $}</translate>
    <span ng-if="ctrl.model.folder">: {$ ctrl.model.folder $}</span>
  </div>
</div>

<div ng-form="uploadForm">
  <div class="modal-body">
    <div class="row">
      <div class="col-sm-6">
        <fieldset>
          <div class="form-group required">
            <label class="control-label required" for="id_name" translate>Folder Name</label>
            <div>
              <input class="form-control" id="id_name" maxlength="255" autofocus required
                     name="name" ng-model="ctrl.model.name" type="text">
            </div>
          </div>
        </fieldset>
      </div>

      <div class="col-sm-6">
        <p translate>
          Note: Delimiters ('{$ ctrl.model.DELIMETER $}') are allowed in the
          folder name to create deep folders.
        </p>
      </div>
    </div>
  </div>

  <div class="modal-footer">
    <button class="btn btn-default" ng-click="$dismiss()">
      <span class="fa fa-close"></span>
      <translate>Cancel</translate>
    </button>
    <button class="btn btn-primary"
           ng-disabled="uploadForm.$invalid || uploadForm.$pristine"
           ng-click="$close(ctrl.model.name)">
      <span class="fa fa-plus"></span>
      <translate>Create Folder</translate>
    </button>
  </div>
</div>
